﻿using AiXiu.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiXiu.IBLL
{
    public interface IVideoBLL
    {
        /// <summary>
        /// 上传视频
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <param name="fileName">文件名</param>
        /// <param name="headline">标题</param>
        /// <param name="location">位置</param>
        /// <returns></returns>
        CreateUploadVideoResult ToBeUpload(int userId,string fileName,string headline,string location=null);

        /// <summary>
        /// 同步视频状态和封面地址
        /// </summary>
        /// <returns></returns>
        int SyncVideos();

        /// <summary>
        /// 通过用户id获取视频列表
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <returns></returns>
        List<TBVideos> GetVideosByUserId(int userId);

        /// <summary>
        /// 根据视频id删除视频
        /// </summary>
        /// <param name="videoId"></param>
        void DeleteVideo(string videoId);

        /// <summary>
        /// 获取可播放的视频列表
        /// </summary>
        /// <returns></returns>
        List<TBVideos> GetVideos();

        /// <summary>
        /// 根据视频id获取视频信息
        /// </summary>
        /// <param name="videoId"></param>
        /// <returns></returns>
        TBVideos GetVideoByVideoId(string videoId);

        /// <summary>
        /// 初始化播放
        /// </summary>
        /// <param name="videoId"></param>
        /// <returns></returns>
        GetPlayInfoResult Initplay(string videoId);
    }
}
